// 判断字符是否为空的方法
export function isEmpty(obj) {
  return typeof obj === 'undefined' || obj === null || obj === '';
}

export function delEmptyProperty(obj) {
  for (let key in obj) {
    if (obj.hasOwnProperty(key)) {
      if (obj[key] === undefined || obj[key] === null) {
        delete obj[key];
      } else if (typeof obj[key] === 'string' && !obj[key]) {
        delete obj[key];
      }
    }
  }
  return obj;
}
